# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>

# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
#  - disable x86 extensions (mmx, sse2, ssse3)

pkgname=pixman
pkgver=0.43.4
pkgrel=1
pkgdesc="The pixel-manipulation library for X and cairo"
arch=(x86_64)
url="https://cgit.freedesktop.org/pixman/"
license=('MIT')
depends=('glibc')
makedepends=('meson' 'libpng')
provides=('libpixman-1.so')
source=(https://xorg.freedesktop.org/releases/individual/lib/${pkgname}-${pkgver}.tar.xz)
sha512sums=('b40fb05bd58dc78f4e4e9b19c86991ab0611b708657c9a7fb42bfe82d57820a0fde01a34b00a0848a41da6c3fb90c2213942a70f435a0e9467631695d3bc7e36')
#validpgpkeys=('') # Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

build() {
  arch-meson $pkgname-$pkgver build \
    -D loongson-mmi=disabled \
    -D vmx=disabled \
    -D arm-simd=disabled \
    -D neon=disabled \
    -D a64-neon=disabled \
    -D iwmmxt=disabled \
    -D mmx=disabled \
    -D sse2=disabled \
    -D ssse3=disabled \
    -D mips-dspr2=disabled \
    -D gtk=disabled
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname-$pkgver/COPYING
}
